<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: register.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";
include LOCALE.LOCALESET."register.php";
include LOCALE.LOCALESET."user_fields.php";

$avloserid=$_GET['avloserid'];
$db = mysql_connect($GLOBALS['db_host'], $GLOBALS['db_user'], $GLOBALS['db_password']);
mysql_select_db($GLOBALS['db_name'], $db); 

$query=" SELECT * FROM avloser WHERE avloserid='$avloserid'";
$result=mysql_query($query);
$num=mysql_numrows($result);

$i=0;
while ($i < $num) {
	$fornavn=mysql_result($result,$i,"fornavn");
	$etternavn=mysql_result($result,$i,"etternavn");
	$adresse=mysql_result($result,$i,"adresse");
	$postnr=mysql_result($result,$i,"postnr");
	$telefon=mysql_result($result,$i,"telefon");
	$mobil=mysql_result($result,$i,"mobil");
	$epost=mysql_result($result,$i,"epost");
	$aktiv=mysql_result($result,$i,"aktiv");
++$i;
}

echo "<br></br><table class='capmain' border='0' cellpadding='0' align='center' width='608px'>
<tr><th><font style='text-transform: capitalize;'>Endre Informasjon om:&nbsp; $fornavn  $etternavn </font></th></tr></table>
<table class='imagetable' table border='0' cellpadding='5' align='center'>
<form action='update.php' method='post'>
<input type='hidden' name='ud_avloserid' value=$avloserid>
<tr>
<th>Fornavn </th><td><input type='text' name='ud_fornavn' value='$fornavn'></td>
<tr></tr>
<th>Etternavn </th><td><input type='text' name='ud_etternavn' value='$etternavn'></td>
<tr></tr>
<th>Adresse </th><td><input type='text' name='ud_adresse' value='$adresse'</td>
<tr></tr>
<th>Postnr </th><td><input type='text' name='ud_postnr' value='$postnr'></td>
<tr></tr>
<th>Telefon </th><td><input type='text' name='ud_telefon' value='$telefon'></td>
<tr></tr>
<th>Mobil </th><td><input type='text' name='ud_mobil' value='$mobil'></td>
<tr></tr>
<th>Epost </th><td><input type='text' name='ud_epost' value='$epost'></td>
<tr></tr>
<th>Aktiv </th><td><input type='text' name='ud_aktiv' value='$aktiv'></td>
</tr><tr>
<th><input type='Submit' value='Oppdater'></th><td></td>
</tr>
</form></table>";

require_once THEMES."templates/footer.php";
?>